﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Sharp.Domain.Repositories;

namespace Sharp.Domain.PlatformBoundedContext.MasterDataModule.Aggregates
{
    public partial class MasterDataRepository 
    {
        public IList<MasterData> GetMasterData()
        {
            List<MasterData> masterDataSorts;
            masterDataSorts = (this.Context as ISql).ExecuteQuery<MasterData>("SELECT NEWID() AS Id,Category AS Name,null ParentCode,0 OrderIndex,'' Code,'' Path,'' FullName,'' Abbreviation,'' Category FROM Platform_MasterDatas GROUP BY Category").ToList();

            return masterDataSorts;
        }
    }
}
